********************************************************************************
* EPIDEMIC SHOCKS AND CIVIL VIOLENCE										   *
*																			   *
* Matteo Cervellati, Elena Esposito, Uwe Sunde								   *
*																			   *
* This script replicates the tables	contained in the article published in:     *
* Review of Economics and Statistics, 2021									   *
********************************************************************************

********************************************************************************
*                                Preliminaries                                 *
********************************************************************************

clear all

set matsize 11000

* Set path:
* global dir "PATH"
* cd "$dir"

capture log close




********************************************************************************
*                                    Table 1                                   *
********************************************************************************


use "conflict_yearly.dta", clear


* Specification 1

areg acled_conflict_dv malaria_infections i.year, ///
    absorb(cell_id) cluster(cell_id)


* Specification 2

areg acled_conflict_dv malaria_infections i.year mean_prec mean_temp spei, ///
    absorb(cell_id) cluster(cell_id)


* Specification 3

areg acled_conflict_dv malaria_infections i.year mean_prec mean_temp spei ///
    mean_prec_lag1 mean_prec_lag2 mean_temp_lag1 mean_temp_lag2 ///
    spei_lag1 spei_lag2, ///
    absorb(cell_id) cluster(cell_id)


* Specification 4

areg acled_conflict_dv malaria_infections i.year mean_prec mean_temp spei ///
    mean_prec_lag1 mean_prec_lag2 mean_temp_lag1 mean_temp_lag2 ///
    spei_lag1 spei_lag2 acled_conflict_dv_lag1, ///
    absorb(cell_id) cluster(cell_id)




********************************************************************************
*                                    Table 2                                   *
********************************************************************************


***** Yearly

use "conflict_yearly.dta", clear


*** Specification 1

areg acled_conflict_dv mal_suit_month mal_suit_month_x_epidem_area i.year ///
    mean_prec mean_temp spei mean_prec_lag1 mean_prec_lag2 mean_temp_lag1 ///
    mean_temp_lag2 spei_lag1 spei_lag2 if sample==1, ///
    absorb(cell_id) cluster(cell_id)


*** Specification 2

areg acled_conflict_dv mal_suit_month mal_suit_month_x_epidem_area ///
    country_x_year_dv_* mean_prec mean_temp spei mean_prec_lag1 ///
    mean_prec_lag2 mean_temp_lag1 mean_temp_lag2 spei_lag1 spei_lag2 ///
    if sample==1, absorb(cell_id) cluster(cell_id)


*** Specification 3

areg acled_conflict_dv mal_suit_month mal_suit_month_x_epidem_area ///
    country_x_year_dv_* mean_prec mean_temp spei mean_prec_lag1 ///
    mean_prec_lag2 mean_temp_lag1 mean_temp_lag2 spei_lag1 spei_lag2 ///
    acled_conflict_dv_lag1 if sample==1, absorb(cell_id) cluster(cell_id)



***** Monthly

use "conflict_monthly.dta", clear


* Specification 4

areg acled_conflict_dv mal_suit_month mal_suit_month_x_epidem_area mean_prec ///
    mean_temp spei mean_prec_lag* mean_temp_lag* spei_lag* MONTHYEARdum* ///
    if sample==1, absorb(cell_id) cluster(cell_id)


* Specification 5

areg acled_conflict_dv mal_suit_month mal_suit_month_x_epidem_area mean_prec ///
    mean_temp spei mean_prec_lag* mean_temp_lag* spei_lag* MONTHdum* ///
    if sample==1, absorb(cellyear) cluster(cell_id)


* Specification 6

areg acled_conflict_dv mal_suit_month mal_suit_month_x_epidem_area mean_prec ///
    mean_temp spei mean_prec_lag* mean_temp_lag* spei_lag* ///
    acled_conflict_dv_lag* MONTHdum* ///
    if sample==1, absorb(cellyear) cluster(cell_id)



********************************************************************************
*                                    Table 3                                   *
********************************************************************************


use "conflict_monthly.dta", clear


* Specification 1

areg acled_conflict_dv mal_suit_onset mal_suit_onset_x_epidem_area mean_prec ///
    mean_temp spei mean_prec_lag* mean_temp_lag* spei_lag* MONTHdum* ///
    if  sample==1, absorb(cell_id) cluster(cell_id)


* Specification 2

areg acled_conflict_dv mal_suit_onset mal_suit_onset_x_epidem_area ///
    mal_suit_incidence mal_suit_incidence_x_epidem_area mean_prec ///
    mean_temp spei mean_prec_lag* mean_temp_lag* spei_lag* MONTHdum* ///
    if sample==1, absorb(cell_id) cluster(cell_id)


* Specification 3

areg acled_conflict_dv mal_suit_onset mal_suit_onset_x_epidem_area ///
    mal_suit_incidence mal_suit_incidence_x_epidem_area mal_suit_prolonged ///
    mal_suit_prolonged_x_epidem_area mean_prec ///
    mean_temp spei mean_prec_lag* mean_temp_lag* spei_lag* MONTHdum* ///
    if sample==1, absorb(cell_id) cluster(cell_id)


* Specification 4

areg acled_conflict_dv mal_suit_onset mal_suit_onset_x_epidem_area mean_prec ///
    mean_temp spei mean_prec_lag* mean_temp_lag* spei_lag* MONTHYEARdum* ///
    if sample==1, absorb(cell_id) cluster(cell_id)


* Specification 5

areg acled_conflict_dv mal_suit_onset mal_suit_onset_x_epidem_area ///
    mal_suit_incidence mal_suit_incidence_x_epidem_area mean_prec ///
    mean_temp spei mean_prec_lag* mean_temp_lag* spei_lag* MONTHYEARdum* ///
    if sample==1, absorb(cell_id) cluster(cell_id)


* Specification 6

areg acled_conflict_dv mal_suit_onset mal_suit_onset_x_epidem_area ///
    mal_suit_incidence mal_suit_incidence_x_epidem_area mal_suit_prolonged ///
    mal_suit_prolonged_x_epidem_area mean_prec ///
    mean_temp spei mean_prec_lag* mean_temp_lag* spei_lag* MONTHYEARdum* ///
    if  sample==1, absorb(cell_id) cluster(cell_id)



********************************************************************************
*                                    Table 4                                   *
********************************************************************************

use "conflict_monthly.dta", clear

* Specification 1

areg acled_conflict_dv mal_suit_month harv_month_g1000kj_geq4m ///
    msm_x_harv_month_g1000kj_geq4m mean_prec ///
    mean_temp spei mean_prec_lag* mean_temp_lag* spei_lag* i.month ///
    if sample==1 & epidem_area==1, absorb(cellyear) cluster(cell_id)


* Specification 2

areg acled_conflict_dv mal_suit_month harv_month_g500kj_leq2m ///
    msm_x_harv_month_g500kj_leq2m mean_prec ///
    mean_temp spei mean_prec_lag* mean_temp_lag* spei_lag* i.month ///
    if sample==1 & epidem_area==1, absorb(cellyear) cluster(cell_id)


* Specification 3

areg acled_conflict_dv mal_suit_month harv_month_g1000kj_leq2m ///
    msm_x_harv_month_g1000kj_leq2m mean_prec ///
    mean_temp spei mean_prec_lag* mean_temp_lag* spei_lag* i.month ///
    if sample==1 & epidem_area==1, absorb(cellyear) cluster(cell_id)


* Specification 4

areg acled_conflict_dv mal_suit_month harv_month_g1500kj_leq2m ///
    msm_x_harv_month_g1500kj_leq2m mean_prec ///
    mean_temp spei mean_prec_lag* mean_temp_lag* spei_lag* i.month ///
    if sample==1 & epidem_area==1, absorb(cellyear) cluster(cell_id)




********************************************************************************
*                                    Table 5                                   *
********************************************************************************

use "conflict_monthly.dta", clear


* Specification 1

areg acled_conflict_dv mal_suit_month msm_x_sickle_precent mean_prec ///
    mean_temp spei mean_prec_lag* mean_temp_lag* spei_lag* MONTHYEARdum* ///
    if sample==1 & epidem_area==1, absorb(cell_id) cluster(cell_id)


* Specification 2

areg acled_conflict_dv mal_suit_month msm_x_sickle_dv mean_prec ///
    mean_temp spei mean_prec_lag* mean_temp_lag* spei_lag* MONTHYEARdum* ///
    if sample==1 & epidem_area==1, absorb(cell_id) cluster(cell_id)


* Specification 3

areg acled_conflict_dv mal_suit_month mean_anti_mal_policy ///
    msm_x_mean_anti_mal_policy mean_prec ///
    mean_temp spei mean_prec_lag* mean_temp_lag* spei_lag* MONTHYEARdum* ///
    if sample==1 & epidem_area==1, absorb(cell_id) cluster(cell_id)


* Specification 4

areg acled_conflict_dv mal_suit_month max_anti_mal_policy ///
    msm_x_max_anti_mal_policy mean_prec ///
    mean_temp spei mean_prec_lag* mean_temp_lag* spei_lag* MONTHYEARdum* ///
    if sample==1 & epidem_area==1, absorb(cell_id) cluster(cell_id)





